package com.多线程;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class AsyncTest {
	public static void main(String[] args) {
		AnnotationConfigApplicationContext context =
				new AnnotationConfigApplicationContext(TaskExcutorConfig.class);
		AsyncTaskServce bean = context.getBean(AsyncTaskServce.class);
		for (int i = 0; i < 10; i++) {
			bean.excuteAsyncTask(i);
			bean.excuteAsyncTaskPlus(i);
		}
		context.close();
	}
}
